#include <QPainter>
#include "notification-background.h"


NotificationBackground::NotificationBackground (const QPixmap& image, QWidget* parent)
    : QWidget(parent), image(image)
{
    parentWidget()->stackUnder(this);
    lower();
    brush = QBrush(image);
}


void NotificationBackground::paintEvent (QPaintEvent* event)
{
    Q_UNUSED(event);
    resize(parentWidget()->size());
    QPainter painter(this);
    painter.setBrush(brush);
    painter.drawPixmap(0, 0, width(), height(), image);
}
